<template>
  <div id="root">
    <div id="ro">
        <span class="span-one fa fa-chevron-left" @touchstart="backClick"></span>
        <div>
        <h1>
        <slot></slot>
        </h1>
        </div>
        <span class="fa fa-ellipsis-h span-two"></span>
    </div>
  </div>
</template>

<script>
import {mapState} from "vuex";
export default {
  computed:{
    ...mapState([
      "islogin",
    ]),
  },
  methods:{
    backClick:function(){
      this.$store.commit("backPath");
    },
  },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
    /* 一个div设置了position：fixed后，它就脱离了文档流，就不再具有宽度，所以要主动设置它的width：100% */
 #ro{
    height:44px;
   background:linear-gradient(to right,#F34B4A,#FF8B88);
    display:flex;
    padding:0 25px 0 10px;
    align-items:center;
    border-bottom:1px solid #dedede;
  }
  #ro .span-one{
    font-size: 18px;
    color:white;
  }
  #ro .span-two{
    font-size: 20px;
    color:white;
  }
  #ro>div{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-grow:1;
    text-align:center;
    margin:0 30px;
  }
  #ro h1{
    display:inline-block;
    font-size: 16px;
    color:white;
  }
</style>
